home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 001-025 / disk_014 / shell / shell.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  2KB  |  69 lines

  1.  
  2. /*
  3.  * SHELL.H
  4.  *
  5.  * Matthew Dillon, 24 Feb 1986
  6.  *
  7.  */
  8.  
  9. #define MAXAV        128            /* Max. # arguments */
  10.  
  11. #define LEVEL_SET    0
  12. #define LEVEL_ALIAS  1
  13.  
  14. #define M_RESET      0
  15. #define M_CONT       1
  16.  
  17. #define V_PROMPT     "_prompt"      /* Special variable names */
  18. #define V_HIST       "_history"
  19.  
  20. #define FL_DOLLAR    0x01  /* One of the following */
  21. #define FL_BANG      0x02
  22. #define FL_PERCENT   0x04
  23. #define FL_QUOTE     0x08
  24. #define FL_IDOLLAR   0x10  /* Any or all of the following may be set */
  25. #define FL_EOC       0x20
  26. #define FL_EOL       0x40
  27. #define FL_OVERIDE   0x80
  28. #define FL_WILD      0x100
  29. #define FL_MASK      (FL_DOLLAR|FL_BANG|FL_PERCENT|FL_QUOTE)
  30.  
  31. #ifdef LATTICE
  32. #include <lattice/stdio.h>
  33. #else
  34. #include <stdio.h>
  35. #endif
  36.  
  37. struct HIST {
  38.    struct HIST *next, *prev;     /* doubly linked list */
  39.    char *line;                   /* line in history    */
  40. };
  41.  
  42. struct PERROR {
  43.    int errnum;                   /* Format of global error lookup */
  44.    char *errstr;
  45. };
  46.  
  47. struct DPTR {                    /* Format of directory fetch pointer */
  48.    struct FileLock *lock;        /* lock on directory   */
  49.    struct FileInfoBlock *fib;    /* mod'd fib for entry */
  50. };
  51.  
  52. extern struct HIST *H_head, *H_tail;
  53. extern struct PERROR Perror[];
  54. extern struct DPTR *dopen();
  55. extern char *set_var(), *get_var(), *next_word();
  56. extern char *get_history(), *compile_av();
  57. extern char *malloc(), *realloc(), *strcpy(), *strcat(), *AllocMem();
  58. extern char **expand();
  59.  
  60. extern char *av[];
  61. extern char *Current;
  62. extern int  H_len, H_tail_base, H_stack;
  63. extern int  ac;
  64. extern int  Debug;
  65. extern int  S_histlen;
  66.  
  67.  
  68.  
  69.